<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:pe="http://primefaces.org/ui/extensions"> 

    <h:form id="formCadastroProduto">
        <p:growl id="growl" showDetail="false"/>
        <h:inputHidden value="#{aliquotaControler.aliquota.id}"/>
        <h:panelGrid columns="2">
            <h:outputText value="Código" style="font-weight: bold;"/>
            <p:inputText value="#{aliquotaControler.aliquota.id}" disabled="true" size="5" rendered="#{!aliquotaControler.alterando}"/>
            <h:outputText value="#{aliquotaControler.aliquota.id}" rendered="#{aliquotaControler.alterando}"/>

            <h:outputText value="Descrição" style="font-weight: bold;"/>
            <p:inputText id="descricaoAli" value="#{aliquotaControler.aliquota.descricao}" required="true" requiredMessage="Informe a aliquota!!" rendered="#{!aliquotaControler.alterando}">
                <p:focus for="descricaoAli"/>
            </p:inputText>
            <h:outputText value="#{aliquotaControler.aliquota.descricao}" rendered="#{aliquotaControler.alterando}"/>

            <h:outputText value="Observação:" style="font-weight: bold;"/>
            <p:inputText value="#{aliquotaControler.aliquota.obs}" size="50" maxlength="30" rendered="#{!aliquotaControler.alterando}"/>
            <h:outputText value="#{aliquotaControler.aliquota.obs}" rendered="#{aliquotaControler.alterando}"/>
        </h:panelGrid>
        <h:panelGrid columns="5">
            <p:commandButton value="Salvar" accesskey="S" action="#{aliquotaControler.salvar()}" update=":formTabela"
                             onclick="statusDialog.show();" onsuccess="statusDialog.hide();" rendered="#{!aliquotaControler.alterando}"/>
            <p:commandButton value="Alterar" update="@form" rendered="#{aliquotaControler.alterando}" action="#{aliquotaControler.alterar()}"/>
            <p:commandButton image="ui-icon ui-icon-close" title="excluir"  rendered="#{aliquotaControler.alterando}" value="Excluir"
                              onclick="confirmationExcluirgrupo.show();"/>
            <p:commandButton value="Novo" accesskey="N" update="@form" action="#{aliquotaControler.inicializaObj()}" process="@this"/>
            <p:commandButton value="Cancelar" accesskey="C" onclick="dlgAliquota.hide()" process="@this"/>
        </h:panelGrid>
    </h:form>
</html>